;;; -*- Mode: Lisp; Package: Macsyma -*-
;;; Translated code for DSK:TENSOR;CTENSR FUNCS
;;; Written on "Thursday, Nov 18, 1982  8:24pm", from MACSYMA 302
;;; Translated for JPG

;;; TRANSL-AUTOLOAD version by GJC on THURSDAY, October 28, 1982, at 4:09:07
;;; TRHOOK version 5 TRMODE version 73 DCL version 5/29/82 8:19:42
;;; MCOMPI version NIL TRDATA version 68 ACALL version NIL
;;; FCALL version NIL TRANSQ version NIL MDEFUN version NIL
;;; MTAGS version NIL TRPRED version 6 TROPER version 15
;;; TRANSF version NIL TRANS5 version 25 TRANS4 version 28
;;; TRANS3 version 46 TRANS2 version 39 TRANS1 version 108
;;; TRUTIL version 26 TRANSL version 1157 TRANSS version 80
(includef (cond ((status feature ITS) '|DSK:LIBMAX;TPRELU >|)
                ((status feature Multics) '|translate|)
                ((status feature Unix) '|libmax/tprelu.l|)
                (t (error '|Unknown system, see GJC@MIT-MC|))))

(eval-when (compile eval)
  (or (status feature lispm)
      (setq *infile-name-key*
               ((lambda (file-name)
                           ;; temp crock for multics.
                          (cond ((eq (typep file-name) 'list)
                                 (namestring file-name))
                                (t file-name)))
                  (truename infile)))))

(eval-when (compile)
   (setq $tr_semicompile 'NIL)
   (setq forms-to-compile-queue ()))

(comment |DSK:TENSOR;CTENSR FUNCS|)

(DEF-MTRVAR $LOADPRINT (QUOTE $LOADPRINT) 1.)
(DECLARE (SPECIAL $DIM))
(DECLARE (SPECIAL $DIAGMETRIC))
(DEFMTRFUN-EXTERNAL ($READVALUE $ANY MDEFINE T NIL))
(DEFMTRFUN-EXTERNAL ($YESP $ANY MDEFINE T NIL))
(DEF-MTRVAR $FUNCTIONS (QUOTE $FUNCTIONS) 1.)
(DEFMTRFUN-EXTERNAL ($SWAPOUT $ANY MDEFINE T NIL))
(DEFMTRFUN-EXTERNAL ($RESIMP $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($KDELT $FIXNUM MDEFINE NIL NIL))
(DEF-MTRVAR $TTEMP (QUOTE $TTEMP) 1.)
(DEF-MTRVAR $OMTEMP (QUOTE $OMTEMP) 1.)
(DEF-MTRVAR $OMEGA (QUOTE $OMEGA) 1.)
(DEF-MTRVAR $VARTEMP (QUOTE $VARTEMP) 1.)
(DEF-MTRVAR $NEWTEMP (QUOTE $NEWTEMP) 1.)
(DEFMTRFUN-EXTERNAL ($TTRANSFORM $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($TXYZSUM $ANY MDEFINE NIL NIL))
(DECLARE (SPECIAL $DERIVABBREV))
(DECLARE (SPECIAL $TETRADCALEQ))
(DECLARE (SPECIAL $TAYSWITCH))
(DECLARE (SPECIAL $RATCHRISTOF))
(DECLARE (SPECIAL $RATEINSTEIN))
(DECLARE (SPECIAL $RATRIEMANN))
(DECLARE (SPECIAL $RATWEYL))
(DEFMTRFUN-EXTERNAL ($SETFLAGS $BOOLEAN MDEFINE NIL NIL))
(DEF-MTRVAR $TENSORKILL (QUOTE $TENSORKILL) 1.)
(DEF-MTRVAR $X (QUOTE $X) 1.)
(DEF-MTRVAR $Y (QUOTE $Y) 1.)
(DEF-MTRVAR $Z (QUOTE $Z) 1.)
(DEF-MTRVAR $T (QUOTE $T) 1.)
(DEFMTRFUN-EXTERNAL ($TSETUP $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $LG (QUOTE $LG) 1.)
(DEFMTRFUN-EXTERNAL ($NEWMET $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $BATCH (QUOTE $BATCH) 1.)
(DEF-MTRVAR $OFF (QUOTE $OFF) 1.)
(DEFMTRFUN-EXTERNAL ($FILEMET $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($SERMET $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($DIAGMATRIXP $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $PARAM (QUOTE $PARAM) 1.)
(DEF-MTRVAR $TAYPT (QUOTE $TAYPT) 1.)
(DEF-MTRVAR $MINP (QUOTE $MINP) 1.)
(DEFMTRFUN-EXTERNAL ($DLGTAYLOR $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $UG (QUOTE $UG) 1.)
(DEFMTRFUN-EXTERNAL ($METRIC $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($SYMMETRICP $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $EM (QUOTE $EM) 1.)
(DEFMTRFUN-EXTERNAL ($MOTION $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($COGRAD $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $M (QUOTE $M) 1.)
(DEF-MTRVAR $N (QUOTE $N) 1.)
(DEFMTRFUN-EXTERNAL ($CONTRAGRAD $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $LCS (QUOTE $LCS) 1.)
(DEF-MTRVAR $MCS (QUOTE $MCS) 1.)
(DEF-MTRVAR $ALL (QUOTE $ALL) 1.)
(DEFMTRFUN-EXTERNAL ($CHRISTOF $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $ARRAYS (QUOTE $ARRAYS) 1.)
(DEF-MTRVAR $LR (QUOTE $LR) 1.)
(DEF-MTRVAR $RATFAC NIL 1.)
(DEFMTRFUN-EXTERNAL ($LRICCICOM $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $RICCI (QUOTE $RICCI) 1.)
(DEFMTRFUN-EXTERNAL ($RICCICOM $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $TRACER (QUOTE $TRACER) 1.)
(DEFMTRFUN-EXTERNAL ($SCURVATURE $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $G (QUOTE $G) 1.)
(DEFMTRFUN-EXTERNAL ($EINSTEIN $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $R (QUOTE $R) 1.)
(DEFMTRFUN-EXTERNAL ($RIEMANN $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $UR (QUOTE $UR) 1.)
(DEFMTRFUN-EXTERNAL ($RAISERIEMANN $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($RINVARIANT $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $W (QUOTE $W) 1.)
(DEFMTRFUN-EXTERNAL ($WEYL $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($NTERMST $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $GDET (QUOTE $GDET) 1.)
(DEFMTRFUN-EXTERNAL ($DSCALAR $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $DIV (QUOTE $DIV) 1.)
(DEFMTRFUN-EXTERNAL ($CHECKDIV $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $DEINDEX (QUOTE $DEINDEX) 1.)
(DEFMTRFUN-EXTERNAL ($FINDDE1 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($FINDDE2 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($FINDDE3 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($CLEANUP $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($FINDDE $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($DELETEN $ANY MDEFINE NIL NIL))
(PUTPROP (QUOTE MAPLIST_TR) (OR (GET (QUOTE MARRAYREF) (QUOTE AUTOLOAD)) T) (QUOTE AUTOLOAD))
(DEF-MTRVAR $NICEPRINT (QUOTE $NICEPRINT) 1.)
(DEF-MTRVAR $KDELT (QUOTE $KDELT) 1.)
(DEF-MTRVAR $SETFLAGS (QUOTE $SETFLAGS) 1.)
(DEF-MTRVAR $BDVAC (QUOTE $BDVAC) 1.)
(DEF-MTRVAR $INVARIANT1 (QUOTE $INVARIANT1) 1.)
(DEF-MTRVAR $INVARIANT2 (QUOTE $INVARIANT2) 1.)
(DEF-MTRVAR $TSETUP (QUOTE $TSETUP) 1.)
(DEF-MTRVAR $NEWMET (QUOTE $NEWMET) 1.)
(DEF-MTRVAR $FILEMET (QUOTE $FILEMET) 1.)
(DEF-MTRVAR $SERMET (QUOTE $SERMET) 1.)
(DEF-MTRVAR $SYMMETRICP (QUOTE $SYMMETRICP) 1.)
(DEF-MTRVAR $DL (QUOTE $DL) 1.)
(DEF-MTRVAR $DU (QUOTE $DU) 1.)
(DEF-MTRVAR $DALEM (QUOTE $DALEM) 1.)
(DEF-MTRVAR $SCURVATURE (QUOTE $SCURVATURE) 1.)
(DEF-MTRVAR $RINVARIANT (QUOTE $RINVARIANT) 1.)
(DEF-MTRVAR $NTERMST (QUOTE $NTERMST) 1.)
(DEF-MTRVAR $DSCALAR (QUOTE $DSCALAR) 1.)
(DEF-MTRVAR $CHECKDIV (QUOTE $CHECKDIV) 1.)
(DEF-MTRVAR $SETUPTETRAD (QUOTE $SETUPTETRAD) 1.)
(DEF-MTRVAR $CONTRACT4 (QUOTE $CONTRACT4) 1.)
(DEF-MTRVAR $PSI (QUOTE $PSI) 1.)
(DEF-MTRVAR $PETROV (QUOTE $PETROV) 1.)
(DEF-MTRVAR $FINDDE1 (QUOTE $FINDDE1) 1.)
(DEF-MTRVAR $FINDDE2 (QUOTE $FINDDE2) 1.)
(DEF-MTRVAR $FINDDE3 (QUOTE $FINDDE3) 1.)
(DEF-MTRVAR $CLEANUP (QUOTE $CLEANUP) 1.)
(DEF-MTRVAR $FINDDE (QUOTE $FINDDE) 1.)
(DEF-MTRVAR $DELETEN (QUOTE $DELETEN) 1.)
(DEF-MTRVAR $GETRID (QUOTE $GETRID) 1.)
(DEFMTRFUN-EXTERNAL ($GETRID $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $ZZ (QUOTE $ZZ) 1.)
(DEF-MTRVAR $BOXQ (QUOTE $BOXQ) 1.)
(DEF-MTRVAR $ADDD (QUOTE $ADDD) 1.)
(DEF-MTRVAR $BD (QUOTE $BD) 1.)
(DEFMTRFUN-EXTERNAL ($BDVAC $ANY MDEFINE NIL NIL))
(DEF-MTRVAR $INV1 (QUOTE $INV1) 1.)
(DEFMTRFUN-EXTERNAL ($INVARIANT1 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($INVARIANT2 $ANY MDEFINE NIL NIL))
(DEFMTRFUN-EXTERNAL ($BIMETRIC $ANY MDEFINE NIL NIL))



(COND ((IS-BOOLE-CHECK (TRD-MSYMEVAL $LOADPRINT (QUOTE $LOADPRINT))) ($PRINT (QUOTE $CTENSR) (QUOTE |&source|) (QUOTE |DSK:TENSOR;CTENSR FUNCS|))))
(SIMPLIFY ($PUT (QUOTE $CTENSR) (QUOTE |DSK:TENSOR;CTENSR FUNCS|) (QUOTE $VERSION)))


(SETQ $TENSORKILL T)

(MEVAL* (QUOTE (($MODEDECLARE) $DIM $FIXNUM)))
(MEVAL* (QUOTE (($DECLARE) $DIM $SPECIAL)))
(DEFPROP $DIM ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $DIM 4.)

(MEVAL* (QUOTE (($MODEDECLARE) $DIAGMETRIC $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $DIAGMETRIC $SPECIAL)))
(DEFPROP $DIAGMETRIC ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $DIAGMETRIC NIL)

(DEFMTRFUN ($READVALUE $ANY MDEFINE T NIL) ($MESSAGE $PRED $BADBOY) NIL ((LAMBDA ($VALUE) NIL (PROG NIL $LOOP (SETQ $VALUE (SIMPLIFY ($READ $MESSAGE))) (COND ((LIKE (SIMPLIFY (MFUNCALL $PRED $VALUE)) T) (RETURN $VALUE))) (COND ((NOT (LIKE $BADBOY (QUOTE ((MLIST))))) (SIMPLIFY (MAPPLY-TR (QUOTE $PRINT) $BADBOY)))) (RETURN (GO $LOOP)))) (QUOTE $VALUE)))

(MEVAL* (QUOTE (($MODEDECLARE) (($FUNCTION) $YESP) $BOOLEAN)))

(DEFMTRFUN ($YESP $ANY MDEFINE T NIL) ($MESSAGES) NIL ((LAMBDA ($REPLY) NIL (PROG NIL $LOOP (SETQ $REPLY (SIMPLIFY (MAPPLY-TR (QUOTE $READ) $MESSAGES))) (COND (($MEMBER $REPLY (LIST (QUOTE (MLIST)) (QUOTE $YES) (QUOTE $YE) (QUOTE $Y))) (RETURN T))) (COND (($MEMBER $REPLY (LIST (QUOTE (MLIST)) (QUOTE $NO) (QUOTE $N))) (RETURN NIL))) ($PRINT (QUOTE |&Please reply YES or NO.|)) (RETURN (GO $LOOP)))) (QUOTE $REPLY)))

(DEFMTRFUN ($SWAPOUT $ANY MDEFINE T NIL) (|tr-gensym~0| |tr-gensym~1|) (UNWIND-PROTECT (PROGN (NEVERSET (QUOTE $FUNCTIONS) |tr-gensym~1|) ((LAMBDA ($FILE $FUNCTIONS) NIL (SIMPLIFY (MAPPLY-TR (QUOTE $KILL) $FUNCTIONS))) |tr-gensym~0| |tr-gensym~1|)) (NEVERSET (QUOTE $FUNCTIONS) (TRD-MSYMEVAL $FUNCTIONS (QUOTE $FUNCTIONS)))))

(DEFMTRFUN ($RESIMP $ANY MDEFINE NIL NIL) ($EXP) NIL (SIMPLIFY (MFUNCALL (QUOTE $EV) $EXP (QUOTE $NOEVAL) (QUOTE $SIMP))))

(DEFMTRFUN ($KDELT $FIXNUM MDEFINE NIL NIL) ($I $J) NIL (PROGN NIL (COND ((= $I $J) 1.) (T 0.))))

(DEFMTRFUN ($TTRANSFORM $ANY MDEFINE NIL NIL) ($QXYZ) NIL ((LAMBDA NIL NIL (MLOCAL $TTEMP $OMTEMP $VARTEMP $NEWTEMP) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (MARRAYREF $QXYZ $I $J) (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)) $I $J) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($SUBSTITUTE (MARRAYREF (TRD-MSYMEVAL $OMTEMP (QUOTE $OMTEMP)) $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $K) (MARRAYREF (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)) $I $J))) (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)) $I $J)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($READ (QUOTE |&Transform #|) $I)) (TRD-MSYMEVAL $VARTEMP (QUOTE $VARTEMP)) $I)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($SUBSTITUTE (MARRAYREF (TRD-MSYMEVAL $VARTEMP (QUOTE $VARTEMP)) $K) (MARRAYREF (TRD-MSYMEVAL $OMTEMP (QUOTE $OMTEMP)) $K) (MARRAYREF (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)) $I $J))) (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)) $I $J)))) (DO (($A 1. (+ 1. $A))) ((> $A (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($B 1. (+ 1. $B))) ((> $B (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $TXYZSUM (TRD-MSYMEVAL $VARTEMP (QUOTE $VARTEMP)) (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $A $B (TRD-MSYMEVAL $TTEMP (QUOTE $TTEMP)))) (TRD-MSYMEVAL $NEWTEMP (QUOTE $NEWTEMP)) $A $B))) (SIMPLIFY ($GENMATRIX (TRD-MSYMEVAL $NEWTEMP (QUOTE $NEWTEMP)) (TRD-MSYMEVAL $DIM 0.) (TRD-MSYMEVAL $DIM 0.))))))

(DEFMTRFUN ($TXYZSUM $ANY MDEFINE NIL NIL) ($VARTEMP $OMEGA $A $B $TTEMP) NIL ((LAMBDA ($TEMP) NIL (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SETQ $TEMP (ADD* $TEMP (MUL* (SIMPLIFY ($DIFF (MARRAYREF $VARTEMP $I) (MARRAYREF $OMEGA $A))) (SIMPLIFY ($DIFF (MARRAYREF $VARTEMP $J) (MARRAYREF $OMEGA $B))) (MARRAYREF $TTEMP $I $J)))))) $TEMP) 0.))

(MEVAL* (QUOTE (($MODEDECLARE) $DERIVABBREV $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $DERIVABBREV $SPECIAL)))
(DEFPROP $DERIVABBREV ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $DERIVABBREV T)

(MEVAL* (QUOTE (($MODEDECLARE) $TETRADCALEQ $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $TETRADCALEQ $SPECIAL)))
(DEFPROP $TETRADCALEQ ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $TETRADCALEQ NIL)

(MEVAL* (QUOTE (($MODEDECLARE) $TAYSWITCH $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $TAYSWITCH $SPECIAL)))
(DEFPROP $TAYSWITCH ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $TAYSWITCH NIL)

(MEVAL* (QUOTE (($MODEDECLARE) $RATCHRISTOF $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $RATCHRISTOF $SPECIAL)))
(DEFPROP $RATCHRISTOF ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $RATCHRISTOF T)

(MEVAL* (QUOTE (($MODEDECLARE) $RATEINSTEIN $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $RATEINSTEIN $SPECIAL)))
(DEFPROP $RATEINSTEIN ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $RATEINSTEIN T)

(MEVAL* (QUOTE (($MODEDECLARE) $RATRIEMANN $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $RATRIEMANN $SPECIAL)))
(DEFPROP $RATRIEMANN ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $RATRIEMANN T)

(MEVAL* (QUOTE (($MODEDECLARE) $RATWEYL $BOOLEAN)))
(MEVAL* (QUOTE (($DECLARE) $RATWEYL $SPECIAL)))
(DEFPROP $RATWEYL ASSIGN-MODE-CHECK ASSIGN)
(DEF-MTRVAR $RATWEYL T)

(DEFMTRFUN ($SETFLAGS $BOOLEAN MDEFINE NIL NIL) NIL NIL (PROGN (PROGN (ASSIGN-MODE-CHECK (QUOTE $DERIVABBREV) T) (SETQ $DERIVABBREV T)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $TETRADCALEQ) NIL) (SETQ $TETRADCALEQ NIL)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $TAYSWITCH) NIL) (SETQ $TAYSWITCH NIL)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $RATCHRISTOF) T) (SETQ $RATCHRISTOF T)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $RATEINSTEIN) T) (SETQ $RATEINSTEIN T)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $RATRIEMANN) T) (SETQ $RATRIEMANN T)) (PROGN (ASSIGN-MODE-CHECK (QUOTE $RATWEYL) T) (SETQ $RATWEYL T))))

(DEFMTRFUN ($TSETUP $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (COND ((NOT (LIKE (TRD-MSYMEVAL $TENSORKILL (QUOTE $TENSORKILL)) T)) (SIMPLIFY ($ERROR (QUOTE |&Type KILL(ALL); and then TENSORKILL:TRUE; before you enter a new metric.|))))) (SETQ $TENSORKILL NIL) (MFUNCTION-CALL $SETFLAGS) ((LAMBDA (|tr-gensym~9|) (PROGN (ASSIGN-MODE-CHECK (QUOTE $DIM) |tr-gensym~9|) (SETQ $DIM |tr-gensym~9|))) (SIMPLIFY (MFUNCTION-CALL $READVALUE (QUOTE |&Enter the dimension of the coordinate system:|) (M-TLAMBDA ($V) NIL (COND (($INTEGERP $V) ((LAMBDA ($U) NIL NIL (COND ((> $U 0.) T))) $V)))) (QUOTE |&Must be a positive integer!|)))) (SETQ $OMEGA (COND ((= (TRD-MSYMEVAL $DIM 0.) 2.) (LIST (QUOTE (MLIST)) (TRD-MSYMEVAL $X (QUOTE $X)) (TRD-MSYMEVAL $Y (QUOTE $Y)))) ((= (TRD-MSYMEVAL $DIM 0.) 3.) (LIST (QUOTE (MLIST)) (TRD-MSYMEVAL $X (QUOTE $X)) (TRD-MSYMEVAL $Y (QUOTE $Y)) (TRD-MSYMEVAL $Z (QUOTE $Z)))) ((= (TRD-MSYMEVAL $DIM 0.) 4.) (LIST (QUOTE (MLIST)) (TRD-MSYMEVAL $X (QUOTE $X)) (TRD-MSYMEVAL $Y (QUOTE $Y)) (TRD-MSYMEVAL $Z (QUOTE $Z)) (TRD-MSYMEVAL $T (QUOTE $T)))) (T (SIMPLIFY ($READ (QUOTE |&Enter a list containing the names of the coordinates in order|)))))) (COND ((MFUNCTION-CALL $YESP (QUOTE |&Do you wish to change the coordinate names?|)) (SETQ $OMEGA (SIMPLIFY ($READ (QUOTE |&Enter a list containing the names of the coordinates in order|)))))) (COND ((NOT (= ($LENGTH (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA))) (TRD-MSYMEVAL $DIM 0.))) (SIMPLIFY ($ERROR (QUOTE |&Length of the coordinate list is not equal to the dimension|))))) (SIMPLIFY (MFUNCTION-CALL $READVALUE (QUOTE |&Do you want to/
1. Enter a new metric?/
2. Enter a metric from a file?/
3. Approximate a metric with a Taylor series?|) (M-TLAMBDA ($OPT) NIL (COND ((LIKE $OPT 1.) (SIMPLIFY (MFUNCTION-CALL $NEWMET)) T) ((LIKE $OPT 2.) (SIMPLIFY (MFUNCTION-CALL $FILEMET)) T) ((LIKE $OPT 3.) (SIMPLIFY (MFUNCTION-CALL $SERMET)) T))) (QUOTE |&Invalid option, please enter 1, 2, or 3.|))) (QUOTE $DONE))))

(DEFMTRFUN ($NEWMET $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (SETQ $LG (SIMPLIFY ($ENTERMATRIX (TRD-MSYMEVAL $DIM 0.) (TRD-MSYMEVAL $DIM 0.)))) (SIMPLIFY ($READ (QUOTE |&Enter functional dependencies with the DEPENDS function or 'N' if none|))) (COND ((MFUNCTION-CALL $YESP (QUOTE |&Do you wish to see the metric?|)) (DISPLAY-FOR-TR NIL NIL (TRD-MSYMEVAL $LG (QUOTE $LG))))) (SIMPLIFY ($METRIC)))))

(DEFMTRFUN ($FILEMET $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA ($FILE $FPOS) NIL (SETQ $FILE (SIMPLIFY ($READ (QUOTE |&Specify the file as [filename1,filename2,directory]?|)))) (SETQ $FPOS (PROGN ($PRINT (QUOTE |&What is the ordinal position of the metric in this file?|)) (SIMPLIFY ($READ (QUOTE |&(Note, the name LG must be assigned to your metric in the file)|))))) (SIMPLIFY (MFUNCALL (TRD-MSYMEVAL $BATCH (QUOTE $BATCH)) $FILE (TRD-MSYMEVAL $OFF (QUOTE $OFF)) $FPOS $FPOS)) (SIMPLIFY ($METRIC))) (QUOTE $FILE) (QUOTE $FPOS)))

(DEFMTRFUN ($SERMET $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (PROGN (ASSIGN-MODE-CHECK (QUOTE $TAYSWITCH) T) (SETQ $TAYSWITCH T)) (SETQ $PARAM (SIMPLIFY ($READ (QUOTE |&Enter expansion parameter|)))) (SETQ $MINP (SIMPLIFY ($READ (QUOTE |&Enter minimum power to drop|)))) (SETQ $TAYPT (SIMPLIFY ($READ (QUOTE |&Enter the point to expand the series around|)))) (COND ((MFUNCTION-CALL $YESP (QUOTE |&Is the metric in a file?|)) (SIMPLIFY (MFUNCTION-CALL $FILEMET))) (T (SIMPLIFY (MFUNCTION-CALL $NEWMET)))))))

(DEFMTRFUN ($DIAGMATRIXP $ANY MDEFINE NIL NIL) ($MAT $NLIM) NIL (PROGN NIL ((LAMBDA ($DIAGFLAG) NIL (DO (($I 1. (+ 1. $I))) ((> $I $NLIM) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J $NLIM) (QUOTE $DONE)) (COND ((AND (NOT (= $I $J)) (NOT (LIKE (MARRAYREF $MAT $I $J) 0.))) (RETURN (SETQ $DIAGFLAG NIL)))))) $DIAGFLAG) T)))

(DEFMTRFUN ($DLGTAYLOR $ANY MDEFINE NIL NIL) ($X) NIL (COND ((TRD-MSYMEVAL $TAYSWITCH NIL) (SIMPLIFY ($RATDISREP (SIMPLIFY ($TAYLOR $X (TRD-MSYMEVAL $PARAM (QUOTE $PARAM)) (TRD-MSYMEVAL $TAYPT (QUOTE $TAYPT)) (ADD* (TRD-MSYMEVAL $MINP (QUOTE $MINP)) -1.)))))) (T $X)))

(DEFMTRFUN ($METRIC $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (COND ((OR (NOT (= ($LENGTH (TRD-MSYMEVAL $LG (QUOTE $LG))) (TRD-MSYMEVAL $DIM 0.))) (NOT (= ($LENGTH (SIMPLIFY ($TRANSPOSE (TRD-MSYMEVAL $LG (QUOTE $LG))))) (TRD-MSYMEVAL $DIM 0.)))) (SIMPLIFY ($ERROR (QUOTE |&The rank of the metric is not equal to the dimension of the space|)))) ((NOT (MFUNCTION-CALL $SYMMETRICP (TRD-MSYMEVAL $LG (QUOTE $LG)) (TRD-MSYMEVAL $DIM 0.))) (SIMPLIFY ($ERROR (QUOTE |&You must be working in a new gravity theory not supported by this program|))))) ((LAMBDA (|tr-gensym~11|) (PROGN (ASSIGN-MODE-CHECK (QUOTE $DIAGMETRIC) |tr-gensym~11|) (SETQ $DIAGMETRIC |tr-gensym~11|))) (MFUNCTION-CALL $DIAGMATRIXP (TRD-MSYMEVAL $LG (QUOTE $LG)) (TRD-MSYMEVAL $DIM 0.))) (SETQ $GDET (SIMPLIFY ($FACTOR (SIMPLIFY ($DETERMINANT (TRD-MSYMEVAL $LG (QUOTE $LG))))))) (SETQ $UG (SIMPLIFY ($IDENT ($LENGTH (SIMPLIFY ($FIRST (TRD-MSYMEVAL $LG (QUOTE $LG)))))))) (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (DO (($II 1. (+ 1. $II))) ((> $II ($LENGTH (SIMPLIFY ($FIRST (TRD-MSYMEVAL $LG (QUOTE $LG)))))) (QUOTE $DONE)) (MARRAYSET (DIV 1. (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $II $II)) (TRD-MSYMEVAL $UG (QUOTE $UG)) $II $II))) (T (SETQ $UG ((LAMBDA ($DETOUT) NIL (NCPOWER (TRD-MSYMEVAL $LG (QUOTE $LG)) -1.)) T)))) (COND ((MFUNCTION-CALL $YESP (QUOTE |&Do you wish to see the metric inverse?|)) (DISPLAY-FOR-TR T NIL (TRD-MSYMEVAL $UG (QUOTE $UG))))) (SETQ $UG (SIMPLIFY (MFUNCTION-CALL $RESIMP (TRD-MSYMEVAL $UG (QUOTE $UG))))) (QUOTE $DONE))))

(DEFMTRFUN ($SYMMETRICP $ANY MDEFINE NIL NIL) ($M $N) NIL (PROGN NIL ((LAMBDA ($SYMFLAG) NIL (COND ((NOT (= $N 1.)) (DO (($I 1. (+ 1. $I))) ((> $I (+ $N -1.)) (QUOTE $DONE)) (DO (($J (+ $I 1.) (+ 1. $J))) ((> $J $N) (QUOTE $DONE)) (COND ((NOT (LIKE (MARRAYREF $M $J $I) (MARRAYREF $M $I $J))) (SETQ $SYMFLAG NIL))))))) $SYMFLAG) T)))

(DEFMTRFUN ($MOTION $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($S) NIL (SIMPLIFY ($DEPENDS (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $S)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP (MUL* (RREMAINDER 1. 2.) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($A /0 (1+ $A)) (G0017 0. (ADD* G0017 (MUL* (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $A $A) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))) (POWER (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $A) $S)) 2.))))) ((< N $A) G0017))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))) (T (MUL* (RREMAINDER 1. 2.) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($B /0 (1+ $B)) (G0018 0. (ADD* G0018 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($A /0 (1+ $A)) (G0019 0. (ADD* G0019 (MUL* (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $A $B) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))) (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $A) $S)) (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $B) $S)))))) ((< N $A) G0019))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $B) G0018))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) (TRD-MSYMEVAL $EM (QUOTE $EM)) $I)) (COND ((NOT (LIKE $DIS NIL)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $EM (QUOTE $EM)) (QUOTE (ARRAY))) $I) (MARRAYREF (TRD-MSYMEVAL $EM (QUOTE $EM)) $I)))))) (QUOTE $DONE)) (QUOTE $S)))

(DEFMTRFUN ($COGRAD $ANY MDEFINE NIL NIL) ($F $XYZ) NIL ((LAMBDA NIL NIL (DO (($MM 1. (+ 1. $MM))) ((> $MM (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SIMPLIFY ($ARRAYSETAPPLY $XYZ (LIST (QUOTE (MLIST)) $MM) (SIMPLIFY ($RATSIMP (SIMPLIFY ($DIFF $F (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $MM)))))))))))

(DEFMTRFUN ($CONTRAGRAD $ANY MDEFINE NIL NIL) ($F $XYZ) NIL ((LAMBDA NIL NIL (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (DO (($MM 1. (+ 1. $MM))) ((> $MM (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SIMPLIFY ($ARRAYSETAPPLY $XYZ (LIST (QUOTE (MLIST)) $MM) (SIMPLIFY ($RATSIMP (SIMPLIFY ($RATSIMP (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $MM $MM) (SIMPLIFY ($DIFF $F (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $MM)))))))))))) (T (DO (($MM 1. (+ 1. $MM))) ((> $MM (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SIMPLIFY ($ARRAYSETAPPLY $XYZ (LIST (QUOTE (MLIST)) $MM) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($NN /0 (1+ $NN)) (G0020 0. (ADD* G0020 (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) (TRD-MSYMEVAL $M (QUOTE $M)) (TRD-MSYMEVAL $N (QUOTE $N))) (SIMPLIFY ($DIFF $F (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $NN))))))) ((< N $NN) G0020))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))))))))

(DEFMTRFUN ($CHRISTOF $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA NIL NIL (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J $I (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (MARRAYSET (DIV (ADD* (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $J $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))) (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J))) (*MMINUS (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $J) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $K))))) 2.) (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $I $J $K) (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $J $I $K)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $K $K) (MARRAYREF (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $I $J $K))))) (T ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($L /0 (1+ $L)) (G0021 0. (ADD* G0021 (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $K $L) (MARRAYREF (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $I $J $L))))) ((< N $L) G0021))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))) (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K) (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $I $K) (COND ((TRD-MSYMEVAL $RATCHRISTOF NIL) (MARRAYSET (MARRAYSET (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K))) (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K) (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $I $K)))))) (COND ((OR (LIKE $DIS (TRD-MSYMEVAL $ALL (QUOTE $ALL))) (LIKE $DIS (TRD-MSYMEVAL $LCS (QUOTE $LCS)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J $I (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $I $J $K) 0.)) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $LCS (QUOTE $LCS)) (QUOTE (ARRAY))) $I $J $K) (MARRAYREF (TRD-MSYMEVAL $LCS (QUOTE $LCS)) $I $J $K)))))))))) (MEVAL (QUOTE (($REMARRAY) $LCS))) (COND ((OR (LIKE $DIS (TRD-MSYMEVAL $MCS (QUOTE $MCS))) (LIKE $DIS (TRD-MSYMEVAL $ALL (QUOTE $ALL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J $I (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K) 0.)) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $MCS (QUOTE $MCS)) (QUOTE (ARRAY))) $I $J $K) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K)))))))))) (QUOTE $DONE))))

(DEFMTRFUN ($LRICCICOM $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($SUMA $SUMB $FLAT) NIL NIL (COND (($MEMBER (QUOTE $MCS) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) T) (T (SIMPLIFY (MFUNCTION-CALL $CHRISTOF NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J $I (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SETQ $SUMA 0.) (SETQ $SUMB 0.) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((NOT (= $K $I)) (SETQ $SUMA (ADD* $SUMA (ADD* (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $K))) (*MMINUS (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $K $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))))))))) (SETQ $SUMB (ADD* $SUMB ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($L /0 (1+ $L)) (G0022 0. (ADD* G0022 (ADD* (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $K $L $K) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $L)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $K $L) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $L $K))))))) ((< N $L) G0022))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* $SUMA $SUMB))) (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) (COND ((TRD-MSYMEVAL $RATFAC NIL) (MARRAYSET (SIMPLIFY ($FACTOR (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J))))))) (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J))) (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) (TRD-MSYMEVAL $LR (QUOTE $LR)) $J $I))) (COND ((NOT (LIKE $DIS NIL)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J $I (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) 0.)) (SETQ $FLAT NIL) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $LR (QUOTE $LR)) (QUOTE (ARRAY))) $I $J) (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J))))))) (COND ($FLAT ($PRINT (QUOTE |&This spacetime is empty and//or flat|)))))) (SETQ $TRACER (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (SIMPLIFY ($RATSIMP ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($I /0 (1+ $I)) (G0023 0. (ADD* G0023 (MUL* (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $I) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $I))))) ((< N $I) G0023))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))))) (T (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0024 0. (ADD* G0024 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($I /0 (1+ $I)) (G0025 0. (ADD* G0025 (MUL* (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $J))))) ((< N $I) G0025))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $J) G0024))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))))) (QUOTE $DONE)) (QUOTE $SUMA) (QUOTE $SUMB) T))

(DEFMTRFUN ($RICCICOM $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($FLAT) NIL NIL (COND (($MEMBER (QUOTE $LR) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) T) (T (SIMPLIFY (MFUNCTION-CALL $LRICCICOM NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET 0. (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (MUL* (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $J $J))))))) (T (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($K /0 (1+ $K)) (G0026 0. (ADD* G0026 (MUL* (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $K) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $K $J))))) ((< N $K) G0026))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))) (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J) (COND ((TRD-MSYMEVAL $RATFAC NIL) (MARRAYSET (SIMPLIFY ($FACTOR (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J))))))) (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J))))) (COND ((NOT (LIKE $DIS NIL)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J) 0.)) (SETQ $FLAT NIL) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) (QUOTE (ARRAY))) $I $J) (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J))))))) (COND ($FLAT ($PRINT (QUOTE |&This spacetime is empty and//or flat|)))))) (QUOTE $DONE)) T))

(DEFMTRFUN ($SCURVATURE $ANY MDEFINE NIL NIL) NIL NIL (COND ((TRD-MSYMEVAL $RATFAC NIL) (SIMPLIFY ($FACTOR (TRD-MSYMEVAL $TRACER (QUOTE $TRACER))))) (T (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)))))

(DEFMTRFUN ($EINSTEIN $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($FLAT) NIL NIL (COND (($MEMBER (QUOTE $RICCI) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) T) (T (SIMPLIFY (MFUNCTION-CALL $RICCICOM NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (COND ((= $I $J) (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J) (*MMINUS (DIV (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) 2.))))) (TRD-MSYMEVAL $G (QUOTE $G)) $I $J)) (T (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $I $J))) (TRD-MSYMEVAL $G (QUOTE $G)) $I $J))) (COND ((TRD-MSYMEVAL $RATFAC NIL) (MARRAYSET (SIMPLIFY ($FACTOR (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $G (QUOTE $G)) $I $J))))) (TRD-MSYMEVAL $G (QUOTE $G)) $I $J)) ((TRD-MSYMEVAL $RATEINSTEIN NIL) (MARRAYSET (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $G (QUOTE $G)) $I $J))) (TRD-MSYMEVAL $G (QUOTE $G)) $I $J))) (COND ((AND (NOT (LIKE $DIS NIL)) (NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $G (QUOTE $G)) $I $J) 0.))) (SETQ $FLAT NIL) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $G (QUOTE $G)) (QUOTE (ARRAY))) $I $J) (MARRAYREF (TRD-MSYMEVAL $G (QUOTE $G)) $I $J))))))) (COND ((AND (NOT (LIKE $DIS NIL)) $FLAT) ($PRINT (QUOTE |&This spacetime is empty and//or flat|)))) (QUOTE $DONE)) T))

(DEFMTRFUN ($RIEMANN $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($FLAT) NIL NIL (COND (($MEMBER (QUOTE $MCS) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) T) (T (SIMPLIFY (MFUNCTION-CALL $CHRISTOF NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L 1. (+ 1. $L))) ((> $L (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET 0. (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L))))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J (+ $I 1.) (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K $I (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L (+ $K 1.) (+ 1. $L))) ((> $L (COND ((= $K $I) $J) (T (TRD-MSYMEVAL $DIM 0.)))) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* (MUL* (RREMAINDER 1. 2.) (ADD* (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $L) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J) 1. (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $K) 1.)) (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $J $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I) 1. (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $L) 1.)) (*MMINUS (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $K) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J) 1. (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $L) 1.))) (*MMINUS (SIMPLIFY ($DIFF (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $J $L) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I) 1. (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $K) 1.))))) (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($U /0 (1+ $U)) (G0027 0. (ADD* G0027 (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $U $U) (ADD* (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $K $U) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $L $U)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $L $U) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $K $U)))))))) ((< N $U) G0027))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) (T ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($U /0 (1+ $U)) (G0028 0. (ADD* G0028 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($V /0 (1+ $V)) (G0029 0. (ADD* G0029 (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $U $V) (ADD* (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $K $U) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $L $V)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $J $L $U) (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $K $V)))))))) ((< N $V) G0029))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $U) G0028))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))))) (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (COND ((TRD-MSYMEVAL $RATFAC NIL) (MARRAYSET (SIMPLIFY ($FACTOR (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L))))) (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L)) ((TRD-MSYMEVAL $RATRIEMANN NIL) (MARRAYSET (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L))) (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L))) (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (TRD-MSYMEVAL $R (QUOTE $R)) $J $I $L $K) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L)) (TRD-MSYMEVAL $R (QUOTE $R)) $J $I $K $L) (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $L $K) (COND ((OR (NOT (= $I $K)) (> $J $L)) (MARRAYSET (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (TRD-MSYMEVAL $R (QUOTE $R)) $L $K $J $I) (TRD-MSYMEVAL $R (QUOTE $R)) $K $L $I $J) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L)) (TRD-MSYMEVAL $R (QUOTE $R)) $K $L $J $I) (TRD-MSYMEVAL $R (QUOTE $R)) $L $K $I $J))) (COND ((AND (NOT (LIKE $DIS NIL)) (NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) 0.))) (SETQ $FLAT NIL) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $R (QUOTE $R)) (QUOTE (ARRAY))) $I $J $K $L) (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L))))))))) (COND ((AND (NOT (LIKE $DIS NIL)) $FLAT) ($PRINT (QUOTE |&This spacetime is flat|)))) (QUOTE $DONE)) T))

(DEFMTRFUN ($RAISERIEMANN $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA NIL NIL (COND (($MEMBER (QUOTE $R) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) T) (T (SIMPLIFY (MFUNCTION-CALL $RIEMANN NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L 1. (+ 1. $L))) ((> $L (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET 0. (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L))))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J (+ $I 1.) (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K $I (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L (+ $K 1.) (+ 1. $L))) ((> $L (COND ((= $K $I) $J) (T (TRD-MSYMEVAL $DIM 0.)))) (QUOTE $DONE)) (MARRAYSET (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP (MUL* (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $I) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $J $J) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $K $K) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $L $L))))) (T ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($D /0 (1+ $D)) (G0030 0. (ADD* G0030 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($C /0 (1+ $C)) (G0031 0. (ADD* G0031 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($B /0 (1+ $B)) (G0032 0. (ADD* G0032 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($A /0 (1+ $A)) (G0033 0. (ADD* G0033 (MUL* (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $A $B $C $D) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $A) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $J $B) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $K $C) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $L $D))))) ((< N $A) G0033))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $B) G0032))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $C) G0031))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $D) G0030))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))) (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L) (COND ((TRD-MSYMEVAL $RATRIEMANN NIL) (MARRAYSET (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L))) (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L))) (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L) (TRD-MSYMEVAL $UR (QUOTE $UR)) $J $I $L $K) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L)) (TRD-MSYMEVAL $UR (QUOTE $UR)) $J $I $K $L) (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $L $K) (COND ((OR (NOT (= $I $K)) (> $J $L)) (MARRAYSET (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L) (TRD-MSYMEVAL $UR (QUOTE $UR)) $L $K $J $I) (TRD-MSYMEVAL $UR (QUOTE $UR)) $K $L $I $J) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L)) (TRD-MSYMEVAL $UR (QUOTE $UR)) $K $L $J $I) (TRD-MSYMEVAL $UR (QUOTE $UR)) $L $K $I $J))) (COND ((AND (NOT (LIKE $DIS NIL)) (NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L) 0.))) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $UR (QUOTE $UR)) (QUOTE (ARRAY))) $I $J $K $L) (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L))))))))))))

(DEFMTRFUN ($RINVARIANT $ANY MDEFINE NIL NIL) NIL NIL (SETQ $KINVARIANT ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($L /0 (1+ $L)) (G0034 0. (ADD* G0034 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($K /0 (1+ $K)) (G0035 0. (ADD* G0035 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0036 0. (ADD* G0036 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($I /0 (1+ $I)) (G0037 0. (ADD* G0037 (MUL* (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (MARRAYREF (TRD-MSYMEVAL $UR (QUOTE $UR)) $I $J $K $L))))) ((< N $I) G0037))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $J) G0036))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $K) G0035))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $L) G0034))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))

(DEFMTRFUN ($WEYL $ANY MDEFINE NIL NIL) ($DIS) NIL ((LAMBDA ($FLAT) NIL (PROG NIL (COND ((= (TRD-MSYMEVAL $DIM 0.) 2.) ($PRINT (QUOTE |&All 2 dimensional spacetimes are conformally flat|)) (RETURN (QUOTE $DONE)))) (COND ((PROGN ($MEMBER (QUOTE $LR) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS))) ($MEMBER (QUOTE $R) (TRD-MSYMEVAL $ARRAYS (QUOTE $ARRAYS)))) T) (T (SIMPLIFY (MFUNCTION-CALL $LRICCICOM NIL)) (SIMPLIFY (MFUNCTION-CALL $RIEMANN NIL)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L 1. (+ 1. $L))) ((> $L (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET 0. (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L))))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J (+ $I 1.) (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K $I (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($L (+ $K 1.) (+ 1. $L))) ((> $L (COND ((= $K $I) $J) (T (TRD-MSYMEVAL $DIM 0.)))) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* (MARRAYREF (TRD-MSYMEVAL $R (QUOTE $R)) $I $J $K $L) (MUL* (RREMAINDER 1. (+ (TRD-MSYMEVAL $DIM 0.) -2.)) (ADD* (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $L) (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $J $K)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $K) (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $L $J))) (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $J $K) (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $L $I)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $J $L) (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $K $I))))) (*MMINUS (MUL* (DIV (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (* (+ (TRD-MSYMEVAL $DIM 0.) -1.) (+ (TRD-MSYMEVAL $DIM 0.) -2.))) (ADD* (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $L) (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $K $J)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $K) (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $L $J))))))))) (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L) (COND ((TRD-MSYMEVAL $RATFAC NIL) (MARRAYSET (SIMPLIFY ($FACTOR (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L))))) (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L)) ((TRD-MSYMEVAL $RATWEYL NIL) (MARRAYSET (SIMPLIFY ($RATSIMP (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L))) (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L))) (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L) (TRD-MSYMEVAL $W (QUOTE $W)) $J $I $L $K) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L)) (TRD-MSYMEVAL $W (QUOTE $W)) $J $I $K $L) (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $L $K) (COND ((OR (NOT (= $I $K)) (> $J $L)) (MARRAYSET (MARRAYSET (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L) (TRD-MSYMEVAL $W (QUOTE $W)) $L $K $J $I) (TRD-MSYMEVAL $W (QUOTE $W)) $K $L $I $J) (MARRAYSET (MARRAYSET (*MMINUS (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L)) (TRD-MSYMEVAL $W (QUOTE $W)) $K $L $J $I) (TRD-MSYMEVAL $W (QUOTE $W)) $L $K $I $J))) (COND ((AND (NOT (LIKE $DIS NIL)) (NOT (LIKE (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L) 0.))) (SETQ $FLAT NIL) (DISPLAY-FOR-TR T T (LIST (QUOTE (MEQUAL)) (LIST (LIST* (TRD-MSYMEVAL $W (QUOTE $W)) (QUOTE (ARRAY))) $I $J $K $L) (MARRAYREF (TRD-MSYMEVAL $W (QUOTE $W)) $I $J $K $L))))))))) (COND ((AND (NOT (LIKE $DIS NIL)) $FLAT) ($PRINT (QUOTE |&This spacetime is conformally flat|)))) (RETURN (QUOTE $DONE)))) T))

(DEFMTRFUN ($NTERMST $ANY MDEFINE NIL NIL) ($F) NIL (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) ($PRINT (LIST (QUOTE (MLIST)) (LIST (QUOTE (MLIST)) $I $J) ($NTERMS (MARRAYREF $F $I $J)))))))

(DEFMTRFUN ($DSCALAR $ANY MDEFINE NIL NIL) ($PHI) NIL (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (SIMPLIFY ($RATSIMP (MUL* (DIV 1. (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET)))))) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($I /0 (1+ $I)) (G0038 0. (ADD* G0038 (SIMPLIFY ($DIFF (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $I) (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET))))) (SIMPLIFY ($DIFF $PHI (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I)))) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I)))))) ((< N $I) G0038))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))) (T (SIMPLIFY ($RATSIMP (MUL* (DIV 1. (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET)))))) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0039 0. (ADD* G0039 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($I /0 (1+ $I)) (G0040 0. (ADD* G0040 (SIMPLIFY ($DIFF (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $I $J) (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET))))) (SIMPLIFY ($DIFF $PHI (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J)))) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I)))))) ((< N $I) G0040))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $J) G0039))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))))))

(DEFMTRFUN ($CHECKDIV $ANY MDEFINE NIL NIL) ($GXYZ) NIL ((LAMBDA NIL NIL NIL (COND ((MFUNCTION-CALL $DIAGMATRIXP $GXYZ (TRD-MSYMEVAL $DIM 0.)) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) ($PRINT (MARRAYSET (SIMPLIFY ($RATSIMP (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* (MUL* (DIV 1. (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET)))))) (SIMPLIFY ($DIFF (MUL* (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET))))) (MARRAYREF $GXYZ $I $I)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I)))) (*MMINUS ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0041 0. (ADD* G0041 (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $J) (MARRAYREF $GXYZ $J $J))))) ((< N $J) G0041))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))))) (TRD-MSYMEVAL $DIV (QUOTE $DIV)) $I)))) (T (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) ($PRINT (MARRAYSET (SIMPLIFY ($RATSIMP (SIMPLIFY (MFUNCTION-CALL $DLGTAYLOR (ADD* (MUL* (DIV 1. (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET)))))) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0042 0. (ADD* G0042 (SIMPLIFY ($DIFF (MUL* (SIMPLIFY (LIST (QUOTE (%SQRT)) (*MMINUS (TRD-MSYMEVAL $GDET (QUOTE $GDET))))) (MARRAYREF $GXYZ $I $J)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J)))))) ((< N $J) G0042))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))) (*MMINUS ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($J /0 (1+ $J)) (G0043 0. (ADD* G0043 ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($A /0 (1+ $A)) (G0044 0. (ADD* G0044 (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $A) (MARRAYREF $GXYZ $A $J))))) ((< N $A) G0044))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.))))) ((< N $J) G0043))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))))) (TRD-MSYMEVAL $DIV (QUOTE $DIV)) $I))))))))

(DEFMTRFUN ($FINDDE1 $ANY MDEFINE NIL NIL) ($LIST) NIL ((LAMBDA ($INFLAG $DERIV $L $L1 $Q) NIL (SETQ $DEINDEX (QUOTE ((MLIST)))) (DO (($I 1. (+ 1. $I))) ((LIKE $LIST (QUOTE ((MLIST)))) (QUOTE $DONE)) (SETQ $L1 (SIMPLIFY ($FACTOR ($NUM (SIMPLIFY ($FIRST $LIST)))))) (SETQ $LIST (SIMPLIFY ($REST $LIST))) (COND ((NOT ($FREEOF $DERIV $L1)) (SETQ $DEINDEX ($CONS $I (TRD-MSYMEVAL $DEINDEX (QUOTE $DEINDEX)))) (COND ((NOT (LIKE (SIMPLIFY ($INPART $L1 0.)) (QUOTE &*))) (SETQ $L ($CONS $L1 $L))) (T (SETQ $Q 1.) (DO (($J 1. (+ 1. $J))) ((> $J ($LENGTH $L1)) (QUOTE $DONE)) (COND ((NOT ($FREEOF $DERIV (SIMPLIFY ($INPART $L1 $J)))) (SETQ $Q (MUL* $Q (SIMPLIFY ($INPART $L1 $J))))))) (SETQ $L ($CONS $Q $L))))))) (SIMPLIFY (MFUNCTION-CALL $CLEANUP $L))) T (SIMPLIFY ($NOUNIFY (QUOTE $DIFF))) (QUOTE ((MLIST))) (QUOTE $L1) (QUOTE $Q)))

(DEFMTRFUN ($FINDDE2 $ANY MDEFINE NIL NIL) ($A) NIL ((LAMBDA ($INFLAG $DERIV $L $T $Q) NIL (SETQ $DEINDEX (QUOTE ((MLIST)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SETQ $T (SIMPLIFY ($FACTOR ($NUM (MARRAYREF $A $I $J))))) (COND ((NOT ($FREEOF $DERIV $T)) (SETQ $DEINDEX ($CONS (LIST (QUOTE (MLIST)) $I $J) (TRD-MSYMEVAL $DEINDEX (QUOTE $DEINDEX)))) (COND ((NOT (LIKE (SIMPLIFY ($INPART $T 0.)) (QUOTE &*))) (SETQ $L ($CONS $T $L))) (T (SETQ $Q 1.) (DO (($N 1. (+ 1. $N))) ((> $N ($LENGTH $T)) (QUOTE $DONE)) (COND ((NOT ($FREEOF $DERIV (SIMPLIFY ($INPART $T $N)))) (SETQ $Q (MUL* $Q (SIMPLIFY ($INPART $T $N))))))) (SETQ $L ($CONS $Q $L)))))))) (SIMPLIFY (MFUNCTION-CALL $CLEANUP $L))) T (SIMPLIFY ($NOUNIFY (QUOTE $DIFF))) (QUOTE ((MLIST))) (QUOTE $T) (QUOTE $Q)))

(DEFMTRFUN ($FINDDE3 $ANY MDEFINE NIL NIL) ($A) NIL ((LAMBDA ($INFLAG $DERIV $L $T $Q) NIL (SETQ $DEINDEX (QUOTE ((MLIST)))) (DO (($I 1. (+ 1. $I))) ((> $I (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($K 1. (+ 1. $K))) ((> $K (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (SETQ $T (SIMPLIFY ($FACTOR ($NUM (MARRAYREF $A $I $J $K))))) (COND ((NOT ($FREEOF $DERIV $T)) (SETQ $DEINDEX ($CONS (LIST (QUOTE (MLIST)) $I $J $K) (TRD-MSYMEVAL $DEINDEX (QUOTE $DEINDEX)))) (COND ((NOT (LIKE (SIMPLIFY ($INPART $T 0.)) (QUOTE &*))) (SETQ $L ($CONS $T $L))) (T (SETQ $Q 1.) (DO (($N 1. (+ 1. $N))) ((> $N ($LENGTH $T)) (QUOTE $DONE)) (COND ((NOT ($FREEOF $DERIV (SIMPLIFY ($INPART $T $N)))) (SETQ $Q (MUL* $Q (SIMPLIFY ($INPART $T $N))))))) (SETQ $L ($CONS $Q $L))))))))) (SIMPLIFY (MFUNCTION-CALL $CLEANUP $L))) T (SIMPLIFY ($NOUNIFY (QUOTE $DIFF))) (QUOTE ((MLIST))) (QUOTE $T) (QUOTE $Q)))

(DEFMTRFUN ($CLEANUP $ANY MDEFINE NIL NIL) ($LL) NIL ((LAMBDA ($A $L $INDEX) NIL (DO ((MDO 1. (+ 1. MDO))) ((LIKE $LL (QUOTE ((MLIST)))) (QUOTE $DONE)) (SETQ $A (SIMPLIFY ($FIRST $LL))) (SETQ $LL (SIMPLIFY ($REST $LL))) (COND ((NOT ($MEMBER $A $LL)) (SETQ $L ($CONS $A $L)) (SETQ $INDEX ($CONS (SIMPLIFY ($FIRST (TRD-MSYMEVAL $DEINDEX (QUOTE $DEINDEX)))) $INDEX)))) (SETQ $DEINDEX (SIMPLIFY ($REST (TRD-MSYMEVAL $DEINDEX (QUOTE $DEINDEX)))))) (SETQ $DEINDEX $INDEX) $L) (QUOTE $A) (QUOTE ((MLIST))) (QUOTE ((MLIST)))))

(DEFMTRFUN ($FINDDE $ANY MDEFINE NIL NIL) ($A $N) NIL (PROGN NIL (COND ((= $N 1.) (SIMPLIFY (MFUNCTION-CALL $FINDDE1 $A))) ((= $N 2.) (SIMPLIFY (MFUNCTION-CALL $FINDDE2 $A))) ((= $N 3.) (SIMPLIFY (MFUNCTION-CALL $FINDDE3 $A))) (T (SIMPLIFY ($ERROR (QUOTE |&Invalid dimension:|) $N))))))

(DEFMTRFUN ($DELETEN $ANY MDEFINE NIL NIL) ($L $N) NIL (PROGN NIL ((LAMBDA ($LEN) NIL NIL (COND ((LIKE $L (QUOTE ((MLIST)))) $L) (T (SETQ $LEN ($LENGTH $L)) (COND ((OR (> $N $LEN) (< $N 1.)) (SIMPLIFY ($ERROR (QUOTE |&Second argument out of range|)))) ((= $N 1.) (SIMPLIFY ($REST $L))) ((= $N $LEN) (SIMPLIFY ($REST $L -1.))) (T ($APPEND (SIMPLIFY ($REST $L (+ $N (- $LEN) -1.))) (SIMPLIFY ($REST $L $N)))))))) 0.)))

(DEFMTRFUN ($GETRID $ANY MDEFINE NIL NIL) NIL NIL (PROGN (MAPLIST_TR (M-TLAMBDA ($U) NIL (SIMPLIFY (MSET $U NIL))) (QUOTE ((MLIST) $TAYSWITCH $RATCHRISTOF $EXPANDCHRISTOF $RATEINSTEIN $RATRIEMANN $HALFC $CHRSUB $MOTION $DLGTAYLOR $TSETUP $CHRISTOF $RICCICOM $TESTINDEX $EINSTEIN $TTRANSFORM $RIEMANN $DIAGMATRIXP $RAISERIEMANN $RSCALAR $LRICCICOM $WEYL $METRIC))) (SIMPLIFY (MFUNCTION-CALL $SWAPOUT (QUOTE ((MLIST))) (TRD-MSYMEVAL $TETRADCALEQ NIL) (TRD-MSYMEVAL $RATWEYL NIL) (TRD-MSYMEVAL $NICEPRINT (QUOTE $NICEPRINT)) (TRD-MSYMEVAL $KDELT (QUOTE $KDELT)) (TRD-MSYMEVAL $SETFLAGS (QUOTE $SETFLAGS)) (TRD-MSYMEVAL $BDVAC (QUOTE $BDVAC)) (TRD-MSYMEVAL $INVARIANT1 (QUOTE $INVARIANT1)) (TRD-MSYMEVAL $INVARIANT2 (QUOTE $INVARIANT2)) (TRD-MSYMEVAL $TSETUP (QUOTE $TSETUP)) (TRD-MSYMEVAL $NEWMET (QUOTE $NEWMET)) (TRD-MSYMEVAL $FILEMET (QUOTE $FILEMET)) (TRD-MSYMEVAL $SERMET (QUOTE $SERMET)) (TRD-MSYMEVAL $SYMMETRICP (QUOTE $SYMMETRICP)) (TRD-MSYMEVAL $DL (QUOTE $DL)) (TRD-MSYMEVAL $DU (QUOTE $DU)) (TRD-MSYMEVAL $DALEM (QUOTE $DALEM)) (TRD-MSYMEVAL $SCURVATURE (QUOTE $SCURVATURE)) (TRD-MSYMEVAL $RINVARIANT (QUOTE $RINVARIANT)) (TRD-MSYMEVAL $NTERMST (QUOTE $NTERMST)) (TRD-MSYMEVAL $DSCALAR (QUOTE $DSCALAR)) (TRD-MSYMEVAL $CHECKDIV (QUOTE $CHECKDIV)) (TRD-MSYMEVAL $SETUPTETRAD (QUOTE $SETUPTETRAD)) (TRD-MSYMEVAL $CONTRACT4 (QUOTE $CONTRACT4)) (TRD-MSYMEVAL $PSI (QUOTE $PSI)) (TRD-MSYMEVAL $PETROV (QUOTE $PETROV)) (TRD-MSYMEVAL $FINDDE1 (QUOTE $FINDDE1)) (TRD-MSYMEVAL $FINDDE2 (QUOTE $FINDDE2)) (TRD-MSYMEVAL $FINDDE3 (QUOTE $FINDDE3)) (TRD-MSYMEVAL $CLEANUP (QUOTE $CLEANUP)) (TRD-MSYMEVAL $FINDDE (QUOTE $FINDDE)) (TRD-MSYMEVAL $DELETEN (QUOTE $DELETEN)) (TRD-MSYMEVAL $GETRID (QUOTE $GETRID))))))

(DEFMTRFUN ($BDVAC $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (COND ((NOT (= (TRD-MSYMEVAL $DIM 0.) 4.)) (SIMPLIFY ($ERROR (QUOTE |& THIS PROGRAM IS RESTRICTED TO 4 DIMENSIONS|))))) (SETQ $ZZ (SIMPLIFY ($READ (QUOTE |&give a name to the scalar field and/
	     declare its functional dependencies|)))) (SETQ $BOXQ 0.) (DO (($I 1. (+ 1. $I))) ((> $I 4.) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J 4.) (QUOTE $DONE)) (MARRAYSET (ADD* (MUL* (DIV (TRD-MSYMEVAL $W (QUOTE $W)) (POWER (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) 2.)) (ADD* (MUL* (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))) (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J)))) (*MMINUS (DIV (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $J) ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($KK /0 (1+ $KK)) (G0045 0. (ADD* G0045 (MUL* (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $KK))) (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $KK))) (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $KK $KK))))) ((< N $KK) G0045))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. 4.)) 2.)))) (DIV (ADD* (SIMPLIFY ($DIFF (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $I))) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $J))) (*MMINUS ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($KK /0 (1+ $KK)) (G0046 0. (ADD* G0046 (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $I $J $KK) (SIMPLIFY ($DIFF (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $KK))))))) ((< N $KK) G0046))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. 4.)) (*MMINUS (MUL* (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $J) (TRD-MSYMEVAL $BOXQ (QUOTE $BOXQ))))) (TRD-MSYMEVAL $ZZ (QUOTE $ZZ)))) (TRD-MSYMEVAL $ADDD (QUOTE $ADDD)) $I $J))) (DO (($I 1. (+ 1. $I))) ((> $I 4.) (QUOTE $DONE)) (DO (($J 1. (+ 1. $J))) ((> $J 4.) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($RATSIMP (ADD* (MARRAYREF (TRD-MSYMEVAL $LR (QUOTE $LR)) $I $J) (*MMINUS (DIV (MUL* (TRD-MSYMEVAL $R (QUOTE $R)) (MARRAYREF (TRD-MSYMEVAL $LG (QUOTE $LG)) $I $J)) 2.)) (*MMINUS (MUL* 0. (MARRAYREF (TRD-MSYMEVAL $T (QUOTE $T)) $I $J))) (*MMINUS (MARRAYREF (TRD-MSYMEVAL $ADDD (QUOTE $ADDD)) $I $J))))) (TRD-MSYMEVAL $BD (QUOTE $BD)) $I $J))) (MEVAL (QUOTE (($REMARRAY) $ADDD))))))

(DEFMTRFUN ($INVARIANT1 $ANY MDEFINE NIL NIL) NIL NIL ((LAMBDA NIL NIL (DO (($AA 1. (+ 1. $AA))) ((> $AA (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($BB 1. (+ 1. $BB))) ((> $BB (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET 0. (TRD-MSYMEVAL $INV1 (QUOTE $INV1)) $AA $BB))) (COND ((TRD-MSYMEVAL $DIAGMETRIC NIL) (DO (($AA 1. (+ 1. $AA))) ((> $AA (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($BB 1. (+ 1. $BB))) ((> $BB (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($RATSIMP (ADD* (DIV (MUL* (MFUNCTION-CALL $KDELT $AA $BB) (POWER (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) 2.)) 2.) (*MMINUS (MUL* 2. (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $AA $BB))) (*MMINUS (MUL* 2. (MFUNCTION-CALL $KDELT $AA $BB) (SIMPLIFY (MFUNCTION-CALL $DSCALAR (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)))))) (MUL* 2. (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $AA $AA) (ADD* (SIMPLIFY ($DIFF (SIMPLIFY ($DIFF (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $BB))) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $AA))) (*MMINUS ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($KK /0 (1+ $KK)) (G0047 0. (ADD* G0047 (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $BB $AA $KK) (SIMPLIFY ($DIFF (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $KK))))))) ((< N $KK) G0047))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))))) (TRD-MSYMEVAL $INV1 (QUOTE $INV1)) $AA $BB)))) (T (DO (($AA 1. (+ 1. $AA))) ((> $AA (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (DO (($BB 1. (+ 1. $BB))) ((> $BB (TRD-MSYMEVAL $DIM 0.)) (QUOTE $DONE)) (MARRAYSET (SIMPLIFY ($RATSIMP (ADD* (DIV (MUL* (MFUNCTION-CALL $KDELT $AA $BB) (POWER (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) 2.)) 2.) (*MMINUS (MUL* 2. (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $RICCI (QUOTE $RICCI)) $AA $BB))) (*MMINUS (MUL* 2. (MFUNCTION-CALL $KDELT $AA $BB) (SIMPLIFY (MFUNCTION-CALL $DSCALAR (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)))))) (MUL* 2. ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($CC /0 (1+ $CC)) (G0048 0. (ADD* G0048 (MUL* (MARRAYREF (TRD-MSYMEVAL $UG (QUOTE $UG)) $BB $CC) (ADD* (SIMPLIFY ($DIFF (SIMPLIFY ($DIFF (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $AA))) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $CC))) (*MMINUS ((LAMBDA (/0 N) (COND ((NOT (< N /0)) (DO (($KK /0 (1+ $KK)) (G0049 0. (ADD* G0049 (MUL* (MARRAYREF (TRD-MSYMEVAL $MCS (QUOTE $MCS)) $AA $CC $KK) (SIMPLIFY ($DIFF (TRD-MSYMEVAL $TRACER (QUOTE $TRACER)) (MARRAYREF (TRD-MSYMEVAL $OMEGA (QUOTE $OMEGA)) $KK))))))) ((< N $KK) G0049))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))))) ((< N $CC) G0048))) ((= N (1- /0)) 0.) (T (INTERVAL-ERROR (QUOTE $SUM) /0 N)))) 1. (TRD-MSYMEVAL $DIM 0.)))))) (TRD-MSYMEVAL $INV1 (QUOTE $INV1)) $AA $BB))))))))

(DEFMTRFUN ($INVARIANT2 $ANY MDEFINE NIL NIL) NIL NIL (QUOTE |&NOT YET IMPLEMENTED|))

(DEFMTRFUN ($BIMETRIC $ANY MDEFINE NIL NIL) NIL NIL (QUOTE |&NOT YET IMPLEMENTED|))


(compile-forms-to-compile-queue)

